~(function(window){
	var MVP = function(){};
	MVP.model = function(){
				var M = {};
		M.data = {
			slideBar : [
				{
					text : '萌妹子',
					icon : 'left_meng.png',
					title : '喵耳萝莉的千本樱',
					content : '自古幼女有三好',
					img : 'left_meng_img.png',
					href : 'http://moe.hao123.com'
				},
				{
					text : '动漫',
					icon : 'left_meng.png',
					title : '喵耳萝莉的千本樱',
					content : '自古幼女有三好',
					img : 'left_meng_img.png',
					href : 'http://moe.hao123.com'
				},
				{
					text : 'lol直播',
					icon : 'left_meng.png',
					title : '喵耳萝莉的千本樱',
					content : '自古幼女有三好',
					img : 'left_meng_img.png',
					href : 'http://moe.hao123.com'
				},
				{
					text : '网络剧',
					icon : 'left_meng.png',
					title : '喵耳萝莉的千本樱',
					content : '自古幼女有三好',
					img : 'left_meng_img.png',
					href : 'http://moe.hao123.com'
				},
				{
					text : '热帖',
					icon : 'left_meng.png',
					title : '喵耳萝莉的千本樱',
					content : '自古幼女有三好',
					img : 'left_meng_img.png',
					href : 'http://moe.hao123.com'
				},
			]
		};
		M.conf = {
			slideBarCloseAnimate : false;
		};
		return {
			getData : function(m){
				return M.data[m];
			},
			getConf : function(c){
				return M.conf[c];
			},
			setData : function(m, v){
				M.data[m] = v;
				return v;
			},
			setConf : function(c, v){
				M.cong[c] = v;
				return v;
			}
		}
	}();
	MVP.view = function(){
		var REPLACEKEY = '_REPLACEKEY_';
		function getHTML(str, replacePos){}
		function eachArray(arr, fn){
			for(var i = 0, len = arr.length; i < len; i++){
				fn(i, arr[i], len);
			}
		}
		function formateItem(str, rep){
			return str.replace(new RegExp(REPLACEKEY, 'g'), rep);
		}
		return function(str){
			var part = str
			.replace(/^\s+|\s+$/g, '')
			.replace(/^\s+(>)\s+/g, '')
			.split('<'),
			html = REPLACEKEY,
			item,
			nodeTpl;
			eachArray(part, function(partIndex, partValue, partLen){
				item = partValue.split('+');
				nodeTpl = REPLACEKEY;
				eachArray(item, function(itemIndex, itemValue, itemLen){
					nodeTpl = formateItem(nodeTpl, getHTML(itemValue, itemIndex === 
						itemLen - 1?(partIndex === partLen - 1?'':'in'):'add'));
				});
				html = formateItem(html, nodeTpl);
			})
			return html;
		}

		function getHTML(str, type){
			return str
			.replace(/^(\w+)([^\{\}*])?(\{(@\w]+)\})?(.*?)$/, function(match, $1, $2, $3, $4, $5){
				$2 = $2 || '';
				$3 = $3 || '';
				$4 = $4 || '';
				$5 = $5.replace(/\{([@\w])+\}/g, '');
				return type === 'in'?
					'<' + $1 + $2 + $5 + '>' + $4 + REPLACEKEY + '</' + $1 + '>' :
					type === 'add' ?
					'<' + $1 + $2 + $5 + '>' + $4  + '</' + $1 + '>' + REPLACEKEY :
					'<' + $1 + $2 + $5 + '>' + $4  + '</' + $1 + '>';
			})
			.replace(/#([@\-\w+])/g, 'id="$1"')
			.replace(/\.([@\-\s\w+])/g, 'class="$1"')
			.replace(/\.[(.+)]/g, function(match, key){
				var a = key
				.replace(/'|"/g, '')
				.split(' '),
				h = '';
				for(var j = 0, len = a.length; j < len; j++){
					h += ' ' + a[j].replace(/=(.*)/g, '="$1"');
				}
				return h;
			})
			.replace(/@(\w+)/g, '{#$1#}');
		}

	}();
	MVP.presenter = function(){
		var V = MVP.view;
		var M = MVP.model;
		var C = {};
		return {
			init : function(){
				for(var i in C){
					C[i] && C[i](M, V, i);
				}
			}
		}
	};
	MVP.init = function(){}
	window.MVP = MVP;
})(window)